<template>
  <el-dialog
    id="pricesDialog"
    title="操作记录"
    :visible.sync="dialogshow"
    :before-close="dialogClose"
    style="display: none"
    top="10vh"
    width="90%"
    :fullscreen="fullscreen"
  >
    <dialog-tools
      v-bind:back="true"
      v-bind:next="true"
      v-bind:goback="true"
      v-bind:prev="true"
      v-bind:screen="true"
      @clickfullscreen="clickfullscreen"
    >
    </dialog-tools>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="date" label="时间" width="180"> </el-table-column>
      <el-table-column prop="name" label="操作员" width="100">
      </el-table-column>

      <el-table-column prop="type" label="操作类型" width="100">
      </el-table-column>
      <!-- <el-table-column
                    prop="object"
                    label="操作对象"
                    width="100">
                </el-table-column> -->
      <el-table-column prop="xianqing" label="详情"> </el-table-column>
    </el-table>
    <div class="block">
      <el-pagination layout="prev, pager, next" :total="50"> </el-pagination>
    </div>
  </el-dialog>
</template>

<style scoped>
</style>

<script>
module.exports = {
  methods: {
    dialogAdd() {
      this.$confirm("是否继续操作?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消",
          });
        });
    },
    dialogClose() {
      this.$emit("dialog_close", 1);
    },
    clickfullscreen() {
      this.fullscreen = !this.fullscreen;
    },
    handleButtons(val) {
      console.log(2222);
      switch (val) {
        case 1:
          this.dialogSendMessage = "true";
          console.log(this.dialogSendMessage);
          break;

        case 10:
          console.log(333);
          this.dialogCustomerInfo = "false";
          this.dialogCustomerGenji = "true";
          console.log(this.dialogCustomerGenji);
          break;
      }
    },
    addData() {
      this.tableDatas.push({
        edit: true,
      });
    },
    //确认添加
    confirmAdd(row) {
      row.edit = false;
    },
    //修改
    editData(row) {
      row.edit = true;
    },
    //删除
    deleteData(row, index) {
      this.tableDatas.splice(index, 1);
    },
  },
  props: ["dialogshow"],
  data() {
    return {
      tableData: [
        {
          date: "2016-05-02 08:59",
          name: "客服1",
          type: "修改",
          object: "客户",
          xianqing: "客户名称：周大福->金六福;",
        },
        {
          date: "2016-05-04 08:59",
          name: "系统",
          type: "修改",
          object: "客户",
          xianqing: "x个月未跟进放回客户池",
        },
        {
          date: "2016-05-04 08:59",
          name: "客服1",
          type: "修改",
          object: "客户",
          xianqing: "领取客户",
        },
        {
          date: "2016-05-02 08:59",
          name: "客服1",
          type: "创建",
          object: "客户",
          xianqing: "",
        },
        {
          date: "2016-05-04 08:59",
          name: "系统",
          type: "删除",
          object: "客户",
          xianqing: "",
        },
        {
          date: "2016-05-04 08:59",
          name: "客服1",
          type: "导入",
          object: "客户",
          xianqing: "",
        },
      ],
    };
  },
  components: {
    "dialog-tools": "url:../tools/dialog-tools.vue",
  },
};
</script>
